package com.yk.service;

import com.yk.pojo.CommonResult;
import com.yk.pojo.Payment;
import lombok.SneakyThrows;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface IPaymentService {


    @RequestMapping("/payment/all")
    public CommonResult<List<Payment>> all();


    @RequestMapping("/payment/get/{id}")
    @ResponseBody
    public CommonResult<Payment> getById(@PathVariable("id") Long id);

    @PostMapping("/payment/create")
    public CommonResult<Integer> create(@RequestBody Payment payment);

    @GetMapping("/payment/discovery")
    public Object discovery();

    @GetMapping("/payment/delay")
    public Object delay();
}
